package com.anlu.concurrent.ch2.forkjoin.sum;

/**
 * <p>
 * Description:TODO 详细描述
 * <p>
 * Copyright: 天津联想协同科技有限公司
 * <p>
 *
 * @author anlu
 * @date 2021/9/6 17:00
 */
public class SumNormal {
    public static void main(String[] args) {
        int count = 0;
        // 生成一个随机数组
        int[] src = MakeArray.makeArray();
        long start = System.currentTimeMillis();

        for (int i = 0;i<src.length;i++){
            count = count + src[i];
        }
        System.out.println("The count is "+count
                +" spend time:"+(System.currentTimeMillis()-start)+"ms");
    }
}
